const cloud = require('wx-server-sdk')

const db = cloud.database()

exports.main = async (event,context)=>{
	let info = {}
	if(event.isFan){
		info['user'] = event.username
	}else{
		info['follower'] = event.username
	}
	let result = await db.collection('follower').where(info).limit(12).skip(event.start*12).get();
	return {'msg':'ok','data':result.data}
}